#!/bin/bash

#FIXME: last arg should be remote(or first? but then all cmds should have remote be first!) so we can use wildcards for source files!

fromlocalpath="$1"
toremotepath="$2"

if test -z "$fromlocalpath" -o -z "$toremotepath"; then
  echo "empty args?"
  exit 2
fi

set -x
k=~/.../koe
chmod u+r -- "$k"
(sleep 3 && chmod u-r -- "$k") &
time scp -i "$k" -vp4 -P 802 -r -- "$fromlocalpath" root@lmighty4:"$toremotepath"
set +x


